package com.beiding.workordersystem.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Set;

@Getter
@Setter
@TableName("role")
public class RoleEntity {


    @TableId
    private String id;

    //角色标识
    private String role;

    //角色名称
    private String name;

    private String description;

    private String pid;

    @TableField(exist = false)
    private List<RoleEntity> children;

    //一对多关系
    @TableField(exist = false)
    private Set<AuthorityEntity> authorities;

    @TableField(exist = false)
    private Set<UserEntity> users;

}
